package CheckProblem;

import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by wangyg 
 * on 2017/7/6 20:37
 */
public class Test {

	public static void main(String[] args) {
		while (true) {
			for (int i = 0; i < Constant.PASSED_SERV_AND_AREA.length; i++) {
				if (equals(235010004, getInt(Constant.PASSED_SERV_AND_AREA[i][0]))) {
					if (("8100000".equals(Constant.PASSED_SERV_AND_AREA[i][1])) || in(
							getLong(Constant.PASSED_SERV_AND_AREA[i][1]), new ArrayList() {{
								add(8320100L);
							}})) {
						continue;
					}
				}
			}
		}

	}

	public static Long getLong(Object object) {
		return object == null ? null : ("".equals(object) ? null : Long.valueOf(object.toString()));
	}

	public static <T> boolean in(T value, List<T> targetList) {
		if (null == value || null == targetList || 0 == targetList.size()) {
			return false;
		}
		for (T v : targetList) {
			if (v == value || value.equals(v)) {
				return true;
			}
		}
		return false;
	}

	public static boolean equals(Integer integer1, Integer integer2) {
		if (null == integer1 && null == integer2) {
			return true;
		}
		if (null != integer1) {
			if (integer1.equals(integer2)) {
				return true;
			} else {
				return false;
			}
		}
		if (null != integer2) {
			if (integer2.equals(integer1)) {
				return true;
			} else {
				return false;
			}
		}
		return false;
	}

	public static Integer getInt(Object object) {
		return object == null ? null : ("".equals(object) ? null : Integer.valueOf(object.toString()));
	}
}
